<template>
  <div id="tutorDetail">
    <div class="tutorDetailCon">
      <div class="tutorDetailHeader">
        <img :src="$globalImageUrl + tutorData.tutorImg" alt="">
        <div class="tutorDetailHeaderInfo">
          <h2>{{tutorData.tutorName}}</h2>
          <p><span>{{tutorData.school}}</span> | <span>{{tutorData.position}}</span> <span>{{tutorData.industryId}}</span></p>
        </div>
      </div>
      <div class="tutorDetailHtml">
        {{tutorData.introduce}}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'tutorDetail',
  data () {
    return {
      tutorId: this.$route.query.tutorId,
      tutorData: {}
    }
  },
  created () {
    this.fetchOneTutor()
  },
  methods: {
    // 获取创业导师详情
    fetchOneTutor () {
      this.$api.getOneTutor({
        id: this.tutorId
      }).then(res => {
        if (res.code === 0) {
          this.tutorData = res.data
        }
      })
    }
  }
}
</script>

<style lang="less" scoped>
  #tutorDetail{
    .tutorDetailCon{
      width: 1200px;
      margin: auto;
      padding: .5rem 0;
      .tutorDetailHeader{
        background-color: #fff;
        border-bottom: 1px solid #eee;
        padding: .2rem;
        img{
          width: 1rem;
          height: 1rem;
          display: inline-block;
          border-radius: 500px;
        }
        .tutorDetailHeaderInfo{
          display: inline-block;
          vertical-align: middle;
          padding-left: .2rem;
          h2{
            font-size: .16rem;
            font-weight: 500;
            line-height: .24rem;
            color: #333;
          }
          p{
            font-size: .16rem;
            font-weight: 500;
            line-height: .24rem;
            color: #333;
            span{
              font-size: .16rem;
              font-weight: 500;
              line-height: .24rem;
              color: #333;
            }
          }
        }
      }
      .tutorDetailHtml{
        background-color: #fff;
        padding: .2rem;
      }
    }
  }
</style>
